package cn.tedu.boot081.controller;

import cn.tedu.boot081.entity.Product;
import cn.tedu.boot081.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {
    @Autowired(required = false)
    ProductMapper mapper;
    @RequestMapping("/select")
    public List<Product> select(){
        List<Product> list=mapper.select();
        return list;
    }
}
